/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this value object you may modify the generated sub-class of this class - VoPurchaseOrder.as.
 */

package com.model.valueObjects
{
import com.adobe.fiber.services.IFiberManagingService;
import com.adobe.fiber.util.FiberUtils;
import com.adobe.fiber.valueobjects.IValueObject;
import flash.events.Event;
import flash.events.EventDispatcher;
import mx.binding.utils.ChangeWatcher;
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;
import mx.events.PropertyChangeEvent;
import mx.validators.ValidationResult;

import flash.net.registerClassAlias;
import flash.net.getClassByAlias;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

use namespace model_internal;

[ExcludeClass]
public class _Super_VoPurchaseOrder extends flash.events.EventDispatcher implements com.adobe.fiber.valueobjects.IValueObject
{
    model_internal static function initRemoteClassAliasSingle(cz:Class) : void
    {
        try
        {
            if (flash.net.getClassByAlias("VoPurchaseOrder") == null)
            {
                flash.net.registerClassAlias("VoPurchaseOrder", cz);
            }
        }
        catch (e:Error)
        {
            flash.net.registerClassAlias("VoPurchaseOrder", cz);
        }
    }

    model_internal static function initRemoteClassAliasAllRelated() : void
    {
    }

    model_internal var _dminternal_model : _VoPurchaseOrderEntityMetadata;

    /**
     * properties
     */
    private var _internal_enq_po_serialnumber : ArrayCollection;
    private var _internal_mapped_sc_list : Object;
    private var _internal_pro_tax : ArrayCollection;
    private var _internal_po_closed_date : String;
    private var _internal_isamend : Boolean;
    private var _internal_total_amt : Number;
    private var _internal_delivery_loc : ArrayCollection;
    private var _internal_discount : Number;
    private var _internal_enq_po_serialnumber_fk : ArrayCollection;
    private var _internal_pro_discount : ArrayCollection;
    private var _internal_tax : Number;
    private var _internal_shipment_charge : Number;
    private var _internal_sales_conformation_fk : ArrayCollection;
    private var _internal_sgd_listprice : ArrayCollection;
    private var _internal_other_part_no : ArrayCollection;
    private var _internal_warehouse_name : ArrayCollection;
    private var _internal_pro_name : ArrayCollection;
    private var _internal_total_qty : int;
    private var _internal_po_term : int;
    private var _internal_self_sc : ArrayCollection;
    private var _internal_cre_userid_fk : int;
    private var _internal_enq_code : ArrayCollection;
    private var _internal_part_number : ArrayCollection;
    private var _internal_po_remarks : String;
    private var _internal_enq_pro_qty : ArrayCollection;
    private var _internal_unit_price : ArrayCollection;
    private var _internal_pro_description : ArrayCollection;
    private var _internal_po_issue_date : String;
    private var _internal_po_serialnumber : int;
    private var _internal_pro_qty : ArrayCollection;
    private var _internal_sc_detserialnumber_fk : ArrayCollection;
    private var _internal_activestatus : Boolean;
    private var _internal_currency_serialnumber_fk : int;
    private var _internal_enq_serialnumber_fk : ArrayCollection;
    private var _internal_current_rate : Number;
    private var _internal_enq_pro_serialnumber_fk : ArrayCollection;
    private var _internal_po_serialnumber_fk : ArrayCollection;
    private var _internal_client_name : String;
    private var _internal_po_detserialnumber : ArrayCollection;
    private var _internal_enq_detserialnumber_fk : ArrayCollection;
    private var _internal_total_amount : Number;
    private var _internal_cre_datetime : String;
    private var _internal_po_status : String;
    private var _internal_pro_status : ArrayCollection;
    private var _internal_po_id : String;
    private var _internal_pro_total_price : ArrayCollection;
    private var _internal_stamp_number : ArrayCollection;
    private var _internal_supplier_serialnumber_fk : int;
    private var _internal_pro_serialnumber_fk : ArrayCollection;
    private var _internal_enq_det_po_serialnumber : ArrayCollection;
    private var _internal_po_confirm_date : String;
    private var _internal_expected_datetime : String;
    private var _internal_po_gst : Number;
    private var _internal_no_of_days : int;
    private var _internal_sales_con_code : ArrayCollection;
    private var _internal_warehouse_serialnumber_fk : ArrayCollection;

    private static var emptyArray:Array = new Array();

    // Change this value according to your application's floating-point precision
    private static var epsilon:Number = 0.0001;

    /**
     * derived property cache initialization
     */
    model_internal var _cacheInitialized_isValid:Boolean = false;

    model_internal var _changeWatcherArray:Array = new Array();

    public function _Super_VoPurchaseOrder()
    {
        _model = new _VoPurchaseOrderEntityMetadata(this);

        // Bind to own data properties for cache invalidation triggering
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_po_serialnumber", model_internal::setterListenerEnq_po_serialnumber));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "mapped_sc_list", model_internal::setterListenerMapped_sc_list));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_tax", model_internal::setterListenerPro_tax));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_closed_date", model_internal::setterListenerPo_closed_date));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "delivery_loc", model_internal::setterListenerDelivery_loc));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_po_serialnumber_fk", model_internal::setterListenerEnq_po_serialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_discount", model_internal::setterListenerPro_discount));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sales_conformation_fk", model_internal::setterListenerSales_conformation_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sgd_listprice", model_internal::setterListenerSgd_listprice));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "other_part_no", model_internal::setterListenerOther_part_no));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "warehouse_name", model_internal::setterListenerWarehouse_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_name", model_internal::setterListenerPro_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "self_sc", model_internal::setterListenerSelf_sc));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_code", model_internal::setterListenerEnq_code));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "part_number", model_internal::setterListenerPart_number));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_remarks", model_internal::setterListenerPo_remarks));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_pro_qty", model_internal::setterListenerEnq_pro_qty));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "unit_price", model_internal::setterListenerUnit_price));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_description", model_internal::setterListenerPro_description));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_issue_date", model_internal::setterListenerPo_issue_date));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_qty", model_internal::setterListenerPro_qty));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sc_detserialnumber_fk", model_internal::setterListenerSc_detserialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_serialnumber_fk", model_internal::setterListenerEnq_serialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_pro_serialnumber_fk", model_internal::setterListenerEnq_pro_serialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_serialnumber_fk", model_internal::setterListenerPo_serialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "client_name", model_internal::setterListenerClient_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_detserialnumber", model_internal::setterListenerPo_detserialnumber));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_detserialnumber_fk", model_internal::setterListenerEnq_detserialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "cre_datetime", model_internal::setterListenerCre_datetime));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_status", model_internal::setterListenerPo_status));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_status", model_internal::setterListenerPro_status));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_id", model_internal::setterListenerPo_id));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_total_price", model_internal::setterListenerPro_total_price));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "stamp_number", model_internal::setterListenerStamp_number));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_serialnumber_fk", model_internal::setterListenerPro_serialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "enq_det_po_serialnumber", model_internal::setterListenerEnq_det_po_serialnumber));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_confirm_date", model_internal::setterListenerPo_confirm_date));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "expected_datetime", model_internal::setterListenerExpected_datetime));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sales_con_code", model_internal::setterListenerSales_con_code));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "warehouse_serialnumber_fk", model_internal::setterListenerWarehouse_serialnumber_fk));

    }

    /**
     * data property getters
     */

    [Bindable(event="propertyChange")]
    public function get enq_po_serialnumber() : ArrayCollection
    {
        return _internal_enq_po_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get mapped_sc_list() : Object
    {
        return _internal_mapped_sc_list;
    }

    [Bindable(event="propertyChange")]
    public function get pro_tax() : ArrayCollection
    {
        return _internal_pro_tax;
    }

    [Bindable(event="propertyChange")]
    public function get po_closed_date() : String
    {
        return _internal_po_closed_date;
    }

    [Bindable(event="propertyChange")]
    public function get isamend() : Boolean
    {
        return _internal_isamend;
    }

    [Bindable(event="propertyChange")]
    public function get total_amt() : Number
    {
        return _internal_total_amt;
    }

    [Bindable(event="propertyChange")]
    public function get delivery_loc() : ArrayCollection
    {
        return _internal_delivery_loc;
    }

    [Bindable(event="propertyChange")]
    public function get discount() : Number
    {
        return _internal_discount;
    }

    [Bindable(event="propertyChange")]
    public function get enq_po_serialnumber_fk() : ArrayCollection
    {
        return _internal_enq_po_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get pro_discount() : ArrayCollection
    {
        return _internal_pro_discount;
    }

    [Bindable(event="propertyChange")]
    public function get tax() : Number
    {
        return _internal_tax;
    }

    [Bindable(event="propertyChange")]
    public function get shipment_charge() : Number
    {
        return _internal_shipment_charge;
    }

    [Bindable(event="propertyChange")]
    public function get sales_conformation_fk() : ArrayCollection
    {
        return _internal_sales_conformation_fk;
    }

    [Bindable(event="propertyChange")]
    public function get sgd_listprice() : ArrayCollection
    {
        return _internal_sgd_listprice;
    }

    [Bindable(event="propertyChange")]
    public function get other_part_no() : ArrayCollection
    {
        return _internal_other_part_no;
    }

    [Bindable(event="propertyChange")]
    public function get warehouse_name() : ArrayCollection
    {
        return _internal_warehouse_name;
    }

    [Bindable(event="propertyChange")]
    public function get pro_name() : ArrayCollection
    {
        return _internal_pro_name;
    }

    [Bindable(event="propertyChange")]
    public function get total_qty() : int
    {
        return _internal_total_qty;
    }

    [Bindable(event="propertyChange")]
    public function get po_term() : int
    {
        return _internal_po_term;
    }

    [Bindable(event="propertyChange")]
    public function get self_sc() : ArrayCollection
    {
        return _internal_self_sc;
    }

    [Bindable(event="propertyChange")]
    public function get cre_userid_fk() : int
    {
        return _internal_cre_userid_fk;
    }

    [Bindable(event="propertyChange")]
    public function get enq_code() : ArrayCollection
    {
        return _internal_enq_code;
    }

    [Bindable(event="propertyChange")]
    public function get part_number() : ArrayCollection
    {
        return _internal_part_number;
    }

    [Bindable(event="propertyChange")]
    public function get po_remarks() : String
    {
        return _internal_po_remarks;
    }

    [Bindable(event="propertyChange")]
    public function get enq_pro_qty() : ArrayCollection
    {
        return _internal_enq_pro_qty;
    }

    [Bindable(event="propertyChange")]
    public function get unit_price() : ArrayCollection
    {
        return _internal_unit_price;
    }

    [Bindable(event="propertyChange")]
    public function get pro_description() : ArrayCollection
    {
        return _internal_pro_description;
    }

    [Bindable(event="propertyChange")]
    public function get po_issue_date() : String
    {
        return _internal_po_issue_date;
    }

    [Bindable(event="propertyChange")]
    public function get po_serialnumber() : int
    {
        return _internal_po_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get pro_qty() : ArrayCollection
    {
        return _internal_pro_qty;
    }

    [Bindable(event="propertyChange")]
    public function get sc_detserialnumber_fk() : ArrayCollection
    {
        return _internal_sc_detserialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get activestatus() : Boolean
    {
        return _internal_activestatus;
    }

    [Bindable(event="propertyChange")]
    public function get currency_serialnumber_fk() : int
    {
        return _internal_currency_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get enq_serialnumber_fk() : ArrayCollection
    {
        return _internal_enq_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get current_rate() : Number
    {
        return _internal_current_rate;
    }

    [Bindable(event="propertyChange")]
    public function get enq_pro_serialnumber_fk() : ArrayCollection
    {
        return _internal_enq_pro_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get po_serialnumber_fk() : ArrayCollection
    {
        return _internal_po_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get client_name() : String
    {
        return _internal_client_name;
    }

    [Bindable(event="propertyChange")]
    public function get po_detserialnumber() : ArrayCollection
    {
        return _internal_po_detserialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get enq_detserialnumber_fk() : ArrayCollection
    {
        return _internal_enq_detserialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get total_amount() : Number
    {
        return _internal_total_amount;
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetime() : String
    {
        return _internal_cre_datetime;
    }

    [Bindable(event="propertyChange")]
    public function get po_status() : String
    {
        return _internal_po_status;
    }

    [Bindable(event="propertyChange")]
    public function get pro_status() : ArrayCollection
    {
        return _internal_pro_status;
    }

    [Bindable(event="propertyChange")]
    public function get po_id() : String
    {
        return _internal_po_id;
    }

    [Bindable(event="propertyChange")]
    public function get pro_total_price() : ArrayCollection
    {
        return _internal_pro_total_price;
    }

    [Bindable(event="propertyChange")]
    public function get stamp_number() : ArrayCollection
    {
        return _internal_stamp_number;
    }

    [Bindable(event="propertyChange")]
    public function get supplier_serialnumber_fk() : int
    {
        return _internal_supplier_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fk() : ArrayCollection
    {
        return _internal_pro_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get enq_det_po_serialnumber() : ArrayCollection
    {
        return _internal_enq_det_po_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get po_confirm_date() : String
    {
        return _internal_po_confirm_date;
    }

    [Bindable(event="propertyChange")]
    public function get expected_datetime() : String
    {
        return _internal_expected_datetime;
    }

    [Bindable(event="propertyChange")]
    public function get po_gst() : Number
    {
        return _internal_po_gst;
    }

    [Bindable(event="propertyChange")]
    public function get no_of_days() : int
    {
        return _internal_no_of_days;
    }

    [Bindable(event="propertyChange")]
    public function get sales_con_code() : ArrayCollection
    {
        return _internal_sales_con_code;
    }

    [Bindable(event="propertyChange")]
    public function get warehouse_serialnumber_fk() : ArrayCollection
    {
        return _internal_warehouse_serialnumber_fk;
    }

    /**
     * data property setters
     */

    public function set enq_po_serialnumber(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_enq_po_serialnumber;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_enq_po_serialnumber = value;
            }
            else if (value is Array)
            {
                _internal_enq_po_serialnumber = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of enq_po_serialnumber must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_po_serialnumber", oldValue, _internal_enq_po_serialnumber));
        }
    }

    public function set mapped_sc_list(value:Object) : void
    {
        var oldValue:Object = _internal_mapped_sc_list;
        if (oldValue !== value)
        {
            _internal_mapped_sc_list = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "mapped_sc_list", oldValue, _internal_mapped_sc_list));
        }
    }

    public function set pro_tax(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_tax;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_tax = value;
            }
            else if (value is Array)
            {
                _internal_pro_tax = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_tax must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_tax", oldValue, _internal_pro_tax));
        }
    }

    public function set po_closed_date(value:String) : void
    {
        var oldValue:String = _internal_po_closed_date;
        if (oldValue !== value)
        {
            _internal_po_closed_date = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_closed_date", oldValue, _internal_po_closed_date));
        }
    }

    public function set isamend(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_isamend;
        if (oldValue !== value)
        {
            _internal_isamend = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "isamend", oldValue, _internal_isamend));
        }
    }

    public function set total_amt(value:Number) : void
    {
        var oldValue:Number = _internal_total_amt;
        if (isNaN(_internal_total_amt) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_total_amt = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "total_amt", oldValue, _internal_total_amt));
        }
    }

    public function set delivery_loc(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_delivery_loc;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_delivery_loc = value;
            }
            else if (value is Array)
            {
                _internal_delivery_loc = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of delivery_loc must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "delivery_loc", oldValue, _internal_delivery_loc));
        }
    }

    public function set discount(value:Number) : void
    {
        var oldValue:Number = _internal_discount;
        if (isNaN(_internal_discount) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_discount = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "discount", oldValue, _internal_discount));
        }
    }

    public function set enq_po_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_enq_po_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_enq_po_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_enq_po_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of enq_po_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_po_serialnumber_fk", oldValue, _internal_enq_po_serialnumber_fk));
        }
    }

    public function set pro_discount(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_discount;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_discount = value;
            }
            else if (value is Array)
            {
                _internal_pro_discount = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_discount must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_discount", oldValue, _internal_pro_discount));
        }
    }

    public function set tax(value:Number) : void
    {
        var oldValue:Number = _internal_tax;
        if (isNaN(_internal_tax) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_tax = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "tax", oldValue, _internal_tax));
        }
    }

    public function set shipment_charge(value:Number) : void
    {
        var oldValue:Number = _internal_shipment_charge;
        if (isNaN(_internal_shipment_charge) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_shipment_charge = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "shipment_charge", oldValue, _internal_shipment_charge));
        }
    }

    public function set sales_conformation_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_sales_conformation_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_sales_conformation_fk = value;
            }
            else if (value is Array)
            {
                _internal_sales_conformation_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of sales_conformation_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sales_conformation_fk", oldValue, _internal_sales_conformation_fk));
        }
    }

    public function set sgd_listprice(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_sgd_listprice;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_sgd_listprice = value;
            }
            else if (value is Array)
            {
                _internal_sgd_listprice = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of sgd_listprice must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sgd_listprice", oldValue, _internal_sgd_listprice));
        }
    }

    public function set other_part_no(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_other_part_no;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_other_part_no = value;
            }
            else if (value is Array)
            {
                _internal_other_part_no = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of other_part_no must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "other_part_no", oldValue, _internal_other_part_no));
        }
    }

    public function set warehouse_name(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_warehouse_name;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_warehouse_name = value;
            }
            else if (value is Array)
            {
                _internal_warehouse_name = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of warehouse_name must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "warehouse_name", oldValue, _internal_warehouse_name));
        }
    }

    public function set pro_name(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_name;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_name = value;
            }
            else if (value is Array)
            {
                _internal_pro_name = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_name must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_name", oldValue, _internal_pro_name));
        }
    }

    public function set total_qty(value:int) : void
    {
        var oldValue:int = _internal_total_qty;
        if (oldValue !== value)
        {
            _internal_total_qty = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "total_qty", oldValue, _internal_total_qty));
        }
    }

    public function set po_term(value:int) : void
    {
        var oldValue:int = _internal_po_term;
        if (oldValue !== value)
        {
            _internal_po_term = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_term", oldValue, _internal_po_term));
        }
    }

    public function set self_sc(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_self_sc;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_self_sc = value;
            }
            else if (value is Array)
            {
                _internal_self_sc = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of self_sc must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "self_sc", oldValue, _internal_self_sc));
        }
    }

    public function set cre_userid_fk(value:int) : void
    {
        var oldValue:int = _internal_cre_userid_fk;
        if (oldValue !== value)
        {
            _internal_cre_userid_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_userid_fk", oldValue, _internal_cre_userid_fk));
        }
    }

    public function set enq_code(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_enq_code;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_enq_code = value;
            }
            else if (value is Array)
            {
                _internal_enq_code = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of enq_code must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_code", oldValue, _internal_enq_code));
        }
    }

    public function set part_number(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_part_number;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_part_number = value;
            }
            else if (value is Array)
            {
                _internal_part_number = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of part_number must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "part_number", oldValue, _internal_part_number));
        }
    }

    public function set po_remarks(value:String) : void
    {
        var oldValue:String = _internal_po_remarks;
        if (oldValue !== value)
        {
            _internal_po_remarks = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_remarks", oldValue, _internal_po_remarks));
        }
    }

    public function set enq_pro_qty(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_enq_pro_qty;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_enq_pro_qty = value;
            }
            else if (value is Array)
            {
                _internal_enq_pro_qty = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of enq_pro_qty must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_pro_qty", oldValue, _internal_enq_pro_qty));
        }
    }

    public function set unit_price(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_unit_price;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_unit_price = value;
            }
            else if (value is Array)
            {
                _internal_unit_price = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of unit_price must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "unit_price", oldValue, _internal_unit_price));
        }
    }

    public function set pro_description(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_description;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_description = value;
            }
            else if (value is Array)
            {
                _internal_pro_description = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_description must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_description", oldValue, _internal_pro_description));
        }
    }

    public function set po_issue_date(value:String) : void
    {
        var oldValue:String = _internal_po_issue_date;
        if (oldValue !== value)
        {
            _internal_po_issue_date = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_issue_date", oldValue, _internal_po_issue_date));
        }
    }

    public function set po_serialnumber(value:int) : void
    {
        var oldValue:int = _internal_po_serialnumber;
        if (oldValue !== value)
        {
            _internal_po_serialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_serialnumber", oldValue, _internal_po_serialnumber));
        }
    }

    public function set pro_qty(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_qty;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_qty = value;
            }
            else if (value is Array)
            {
                _internal_pro_qty = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_qty must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_qty", oldValue, _internal_pro_qty));
        }
    }

    public function set sc_detserialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_sc_detserialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_sc_detserialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_sc_detserialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of sc_detserialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sc_detserialnumber_fk", oldValue, _internal_sc_detserialnumber_fk));
        }
    }

    public function set activestatus(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_activestatus;
        if (oldValue !== value)
        {
            _internal_activestatus = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "activestatus", oldValue, _internal_activestatus));
        }
    }

    public function set currency_serialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_currency_serialnumber_fk;
        if (oldValue !== value)
        {
            _internal_currency_serialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "currency_serialnumber_fk", oldValue, _internal_currency_serialnumber_fk));
        }
    }

    public function set enq_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_enq_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_enq_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_enq_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of enq_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_serialnumber_fk", oldValue, _internal_enq_serialnumber_fk));
        }
    }

    public function set current_rate(value:Number) : void
    {
        var oldValue:Number = _internal_current_rate;
        if (isNaN(_internal_current_rate) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_current_rate = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "current_rate", oldValue, _internal_current_rate));
        }
    }

    public function set enq_pro_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_enq_pro_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_enq_pro_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_enq_pro_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of enq_pro_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_pro_serialnumber_fk", oldValue, _internal_enq_pro_serialnumber_fk));
        }
    }

    public function set po_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_po_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_po_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_po_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of po_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_serialnumber_fk", oldValue, _internal_po_serialnumber_fk));
        }
    }

    public function set client_name(value:String) : void
    {
        var oldValue:String = _internal_client_name;
        if (oldValue !== value)
        {
            _internal_client_name = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "client_name", oldValue, _internal_client_name));
        }
    }

    public function set po_detserialnumber(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_po_detserialnumber;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_po_detserialnumber = value;
            }
            else if (value is Array)
            {
                _internal_po_detserialnumber = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of po_detserialnumber must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_detserialnumber", oldValue, _internal_po_detserialnumber));
        }
    }

    public function set enq_detserialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_enq_detserialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_enq_detserialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_enq_detserialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of enq_detserialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_detserialnumber_fk", oldValue, _internal_enq_detserialnumber_fk));
        }
    }

    public function set total_amount(value:Number) : void
    {
        var oldValue:Number = _internal_total_amount;
        if (isNaN(_internal_total_amount) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_total_amount = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "total_amount", oldValue, _internal_total_amount));
        }
    }

    public function set cre_datetime(value:String) : void
    {
        var oldValue:String = _internal_cre_datetime;
        if (oldValue !== value)
        {
            _internal_cre_datetime = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetime", oldValue, _internal_cre_datetime));
        }
    }

    public function set po_status(value:String) : void
    {
        var oldValue:String = _internal_po_status;
        if (oldValue !== value)
        {
            _internal_po_status = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_status", oldValue, _internal_po_status));
        }
    }

    public function set pro_status(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_status;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_status = value;
            }
            else if (value is Array)
            {
                _internal_pro_status = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_status must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_status", oldValue, _internal_pro_status));
        }
    }

    public function set po_id(value:String) : void
    {
        var oldValue:String = _internal_po_id;
        if (oldValue !== value)
        {
            _internal_po_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_id", oldValue, _internal_po_id));
        }
    }

    public function set pro_total_price(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_total_price;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_total_price = value;
            }
            else if (value is Array)
            {
                _internal_pro_total_price = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_total_price must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_total_price", oldValue, _internal_pro_total_price));
        }
    }

    public function set stamp_number(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_stamp_number;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_stamp_number = value;
            }
            else if (value is Array)
            {
                _internal_stamp_number = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of stamp_number must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "stamp_number", oldValue, _internal_stamp_number));
        }
    }

    public function set supplier_serialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_supplier_serialnumber_fk;
        if (oldValue !== value)
        {
            _internal_supplier_serialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "supplier_serialnumber_fk", oldValue, _internal_supplier_serialnumber_fk));
        }
    }

    public function set pro_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_pro_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fk", oldValue, _internal_pro_serialnumber_fk));
        }
    }

    public function set enq_det_po_serialnumber(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_enq_det_po_serialnumber;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_enq_det_po_serialnumber = value;
            }
            else if (value is Array)
            {
                _internal_enq_det_po_serialnumber = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of enq_det_po_serialnumber must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_det_po_serialnumber", oldValue, _internal_enq_det_po_serialnumber));
        }
    }

    public function set po_confirm_date(value:String) : void
    {
        var oldValue:String = _internal_po_confirm_date;
        if (oldValue !== value)
        {
            _internal_po_confirm_date = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_confirm_date", oldValue, _internal_po_confirm_date));
        }
    }

    public function set expected_datetime(value:String) : void
    {
        var oldValue:String = _internal_expected_datetime;
        if (oldValue !== value)
        {
            _internal_expected_datetime = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "expected_datetime", oldValue, _internal_expected_datetime));
        }
    }

    public function set po_gst(value:Number) : void
    {
        var oldValue:Number = _internal_po_gst;
        if (isNaN(_internal_po_gst) == true || Math.abs(oldValue - value) > epsilon)
        {
            _internal_po_gst = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_gst", oldValue, _internal_po_gst));
        }
    }

    public function set no_of_days(value:int) : void
    {
        var oldValue:int = _internal_no_of_days;
        if (oldValue !== value)
        {
            _internal_no_of_days = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "no_of_days", oldValue, _internal_no_of_days));
        }
    }

    public function set sales_con_code(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_sales_con_code;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_sales_con_code = value;
            }
            else if (value is Array)
            {
                _internal_sales_con_code = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of sales_con_code must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sales_con_code", oldValue, _internal_sales_con_code));
        }
    }

    public function set warehouse_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_warehouse_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_warehouse_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_warehouse_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of warehouse_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "warehouse_serialnumber_fk", oldValue, _internal_warehouse_serialnumber_fk));
        }
    }

    /**
     * Data property setter listeners
     *
     * Each data property whose value affects other properties or the validity of the entity
     * needs to invalidate all previously calculated artifacts. These include:
     *  - any derived properties or constraints that reference the given data property.
     *  - any availability guards (variant expressions) that reference the given data property.
     *  - any style validations, message tokens or guards that reference the given data property.
     *  - the validity of the property (and the containing entity) if the given data property has a length restriction.
     *  - the validity of the property (and the containing entity) if the given data property is required.
     */

    model_internal function setterListenerEnq_po_serialnumber(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerEnq_po_serialnumber);
            }
        }
        _model.invalidateDependentOnEnq_po_serialnumber();
    }

    model_internal function setterListenerMapped_sc_list(value:flash.events.Event):void
    {
        _model.invalidateDependentOnMapped_sc_list();
    }

    model_internal function setterListenerPro_tax(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_tax);
            }
        }
        _model.invalidateDependentOnPro_tax();
    }

    model_internal function setterListenerPo_closed_date(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPo_closed_date();
    }

    model_internal function setterListenerDelivery_loc(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerDelivery_loc);
            }
        }
        _model.invalidateDependentOnDelivery_loc();
    }

    model_internal function setterListenerEnq_po_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerEnq_po_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnEnq_po_serialnumber_fk();
    }

    model_internal function setterListenerPro_discount(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_discount);
            }
        }
        _model.invalidateDependentOnPro_discount();
    }

    model_internal function setterListenerSales_conformation_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSales_conformation_fk);
            }
        }
        _model.invalidateDependentOnSales_conformation_fk();
    }

    model_internal function setterListenerSgd_listprice(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSgd_listprice);
            }
        }
        _model.invalidateDependentOnSgd_listprice();
    }

    model_internal function setterListenerOther_part_no(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerOther_part_no);
            }
        }
        _model.invalidateDependentOnOther_part_no();
    }

    model_internal function setterListenerWarehouse_name(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerWarehouse_name);
            }
        }
        _model.invalidateDependentOnWarehouse_name();
    }

    model_internal function setterListenerPro_name(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_name);
            }
        }
        _model.invalidateDependentOnPro_name();
    }

    model_internal function setterListenerSelf_sc(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSelf_sc);
            }
        }
        _model.invalidateDependentOnSelf_sc();
    }

    model_internal function setterListenerEnq_code(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerEnq_code);
            }
        }
        _model.invalidateDependentOnEnq_code();
    }

    model_internal function setterListenerPart_number(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPart_number);
            }
        }
        _model.invalidateDependentOnPart_number();
    }

    model_internal function setterListenerPo_remarks(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPo_remarks();
    }

    model_internal function setterListenerEnq_pro_qty(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerEnq_pro_qty);
            }
        }
        _model.invalidateDependentOnEnq_pro_qty();
    }

    model_internal function setterListenerUnit_price(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerUnit_price);
            }
        }
        _model.invalidateDependentOnUnit_price();
    }

    model_internal function setterListenerPro_description(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_description);
            }
        }
        _model.invalidateDependentOnPro_description();
    }

    model_internal function setterListenerPo_issue_date(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPo_issue_date();
    }

    model_internal function setterListenerPro_qty(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_qty);
            }
        }
        _model.invalidateDependentOnPro_qty();
    }

    model_internal function setterListenerSc_detserialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSc_detserialnumber_fk);
            }
        }
        _model.invalidateDependentOnSc_detserialnumber_fk();
    }

    model_internal function setterListenerEnq_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerEnq_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnEnq_serialnumber_fk();
    }

    model_internal function setterListenerEnq_pro_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerEnq_pro_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnEnq_pro_serialnumber_fk();
    }

    model_internal function setterListenerPo_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPo_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnPo_serialnumber_fk();
    }

    model_internal function setterListenerClient_name(value:flash.events.Event):void
    {
        _model.invalidateDependentOnClient_name();
    }

    model_internal function setterListenerPo_detserialnumber(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPo_detserialnumber);
            }
        }
        _model.invalidateDependentOnPo_detserialnumber();
    }

    model_internal function setterListenerEnq_detserialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerEnq_detserialnumber_fk);
            }
        }
        _model.invalidateDependentOnEnq_detserialnumber_fk();
    }

    model_internal function setterListenerCre_datetime(value:flash.events.Event):void
    {
        _model.invalidateDependentOnCre_datetime();
    }

    model_internal function setterListenerPo_status(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPo_status();
    }

    model_internal function setterListenerPro_status(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_status);
            }
        }
        _model.invalidateDependentOnPro_status();
    }

    model_internal function setterListenerPo_id(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPo_id();
    }

    model_internal function setterListenerPro_total_price(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_total_price);
            }
        }
        _model.invalidateDependentOnPro_total_price();
    }

    model_internal function setterListenerStamp_number(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerStamp_number);
            }
        }
        _model.invalidateDependentOnStamp_number();
    }

    model_internal function setterListenerPro_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnPro_serialnumber_fk();
    }

    model_internal function setterListenerEnq_det_po_serialnumber(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerEnq_det_po_serialnumber);
            }
        }
        _model.invalidateDependentOnEnq_det_po_serialnumber();
    }

    model_internal function setterListenerPo_confirm_date(value:flash.events.Event):void
    {
        _model.invalidateDependentOnPo_confirm_date();
    }

    model_internal function setterListenerExpected_datetime(value:flash.events.Event):void
    {
        _model.invalidateDependentOnExpected_datetime();
    }

    model_internal function setterListenerSales_con_code(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSales_con_code);
            }
        }
        _model.invalidateDependentOnSales_con_code();
    }

    model_internal function setterListenerWarehouse_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerWarehouse_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnWarehouse_serialnumber_fk();
    }


    /**
     * valid related derived properties
     */
    model_internal var _isValid : Boolean;
    model_internal var _invalidConstraints:Array = new Array();
    model_internal var _validationFailureMessages:Array = new Array();

    /**
     * derived property calculators
     */

    /**
     * isValid calculator
     */
    model_internal function calculateIsValid():Boolean
    {
        var violatedConsts:Array = new Array();
        var validationFailureMessages:Array = new Array();

        var propertyValidity:Boolean = true;
        if (!_model.enq_po_serialnumberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_po_serialnumberValidationFailureMessages);
        }
        if (!_model.mapped_sc_listIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_mapped_sc_listValidationFailureMessages);
        }
        if (!_model.pro_taxIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_taxValidationFailureMessages);
        }
        if (!_model.po_closed_dateIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_closed_dateValidationFailureMessages);
        }
        if (!_model.delivery_locIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_delivery_locValidationFailureMessages);
        }
        if (!_model.enq_po_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_po_serialnumber_fkValidationFailureMessages);
        }
        if (!_model.pro_discountIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_discountValidationFailureMessages);
        }
        if (!_model.sales_conformation_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sales_conformation_fkValidationFailureMessages);
        }
        if (!_model.sgd_listpriceIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sgd_listpriceValidationFailureMessages);
        }
        if (!_model.other_part_noIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_other_part_noValidationFailureMessages);
        }
        if (!_model.warehouse_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_warehouse_nameValidationFailureMessages);
        }
        if (!_model.pro_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_nameValidationFailureMessages);
        }
        if (!_model.self_scIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_self_scValidationFailureMessages);
        }
        if (!_model.enq_codeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_codeValidationFailureMessages);
        }
        if (!_model.part_numberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_part_numberValidationFailureMessages);
        }
        if (!_model.po_remarksIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_remarksValidationFailureMessages);
        }
        if (!_model.enq_pro_qtyIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_pro_qtyValidationFailureMessages);
        }
        if (!_model.unit_priceIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_unit_priceValidationFailureMessages);
        }
        if (!_model.pro_descriptionIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_descriptionValidationFailureMessages);
        }
        if (!_model.po_issue_dateIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_issue_dateValidationFailureMessages);
        }
        if (!_model.pro_qtyIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_qtyValidationFailureMessages);
        }
        if (!_model.sc_detserialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sc_detserialnumber_fkValidationFailureMessages);
        }
        if (!_model.enq_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_serialnumber_fkValidationFailureMessages);
        }
        if (!_model.enq_pro_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_pro_serialnumber_fkValidationFailureMessages);
        }
        if (!_model.po_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_serialnumber_fkValidationFailureMessages);
        }
        if (!_model.client_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_client_nameValidationFailureMessages);
        }
        if (!_model.po_detserialnumberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_detserialnumberValidationFailureMessages);
        }
        if (!_model.enq_detserialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_detserialnumber_fkValidationFailureMessages);
        }
        if (!_model.cre_datetimeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_cre_datetimeValidationFailureMessages);
        }
        if (!_model.po_statusIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_statusValidationFailureMessages);
        }
        if (!_model.pro_statusIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_statusValidationFailureMessages);
        }
        if (!_model.po_idIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_idValidationFailureMessages);
        }
        if (!_model.pro_total_priceIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_total_priceValidationFailureMessages);
        }
        if (!_model.stamp_numberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_stamp_numberValidationFailureMessages);
        }
        if (!_model.pro_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_serialnumber_fkValidationFailureMessages);
        }
        if (!_model.enq_det_po_serialnumberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_enq_det_po_serialnumberValidationFailureMessages);
        }
        if (!_model.po_confirm_dateIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_confirm_dateValidationFailureMessages);
        }
        if (!_model.expected_datetimeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_expected_datetimeValidationFailureMessages);
        }
        if (!_model.sales_con_codeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sales_con_codeValidationFailureMessages);
        }
        if (!_model.warehouse_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_warehouse_serialnumber_fkValidationFailureMessages);
        }

        model_internal::_cacheInitialized_isValid = true;
        model_internal::invalidConstraints_der = violatedConsts;
        model_internal::validationFailureMessages_der = validationFailureMessages;
        return violatedConsts.length == 0 && propertyValidity;
    }

    /**
     * derived property setters
     */

    model_internal function set isValid_der(value:Boolean) : void
    {
        var oldValue:Boolean = model_internal::_isValid;
        if (oldValue !== value)
        {
            model_internal::_isValid = value;
            _model.model_internal::fireChangeEvent("isValid", oldValue, model_internal::_isValid);
        }
    }

    /**
     * derived property getters
     */

    [Transient]
    [Bindable(event="propertyChange")]
    public function get _model() : _VoPurchaseOrderEntityMetadata
    {
        return model_internal::_dminternal_model;
    }

    public function set _model(value : _VoPurchaseOrderEntityMetadata) : void
    {
        var oldValue : _VoPurchaseOrderEntityMetadata = model_internal::_dminternal_model;
        if (oldValue !== value)
        {
            model_internal::_dminternal_model = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "_model", oldValue, model_internal::_dminternal_model));
        }
    }

    /**
     * methods
     */


    /**
     *  services
     */
    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagingService):void
    {
        _managingService = managingService;
    }

    model_internal function set invalidConstraints_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invalidConstraints;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_invalidConstraints = value;
            _model.model_internal::fireChangeEvent("invalidConstraints", oldValue, model_internal::_invalidConstraints);
        }
    }

    model_internal function set validationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_validationFailureMessages;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_validationFailureMessages = value;
            _model.model_internal::fireChangeEvent("validationFailureMessages", oldValue, model_internal::_validationFailureMessages);
        }
    }

    model_internal var _doValidationCacheOfEnq_po_serialnumber : Array = null;
    model_internal var _doValidationLastValOfEnq_po_serialnumber : ArrayCollection;

    model_internal function _doValidationForEnq_po_serialnumber(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfEnq_po_serialnumber != null && model_internal::_doValidationLastValOfEnq_po_serialnumber == value)
           return model_internal::_doValidationCacheOfEnq_po_serialnumber ;

        _model.model_internal::_enq_po_serialnumberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_po_serialnumberAvailable && _internal_enq_po_serialnumber == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_po_serialnumber is required"));
        }

        model_internal::_doValidationCacheOfEnq_po_serialnumber = validationFailures;
        model_internal::_doValidationLastValOfEnq_po_serialnumber = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfMapped_sc_list : Array = null;
    model_internal var _doValidationLastValOfMapped_sc_list : Object;

    model_internal function _doValidationForMapped_sc_list(valueIn:Object):Array
    {
        var value : Object = valueIn as Object;

        if (model_internal::_doValidationCacheOfMapped_sc_list != null && model_internal::_doValidationLastValOfMapped_sc_list == value)
           return model_internal::_doValidationCacheOfMapped_sc_list ;

        _model.model_internal::_mapped_sc_listIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isMapped_sc_listAvailable && _internal_mapped_sc_list == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "mapped_sc_list is required"));
        }

        model_internal::_doValidationCacheOfMapped_sc_list = validationFailures;
        model_internal::_doValidationLastValOfMapped_sc_list = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_tax : Array = null;
    model_internal var _doValidationLastValOfPro_tax : ArrayCollection;

    model_internal function _doValidationForPro_tax(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_tax != null && model_internal::_doValidationLastValOfPro_tax == value)
           return model_internal::_doValidationCacheOfPro_tax ;

        _model.model_internal::_pro_taxIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_taxAvailable && _internal_pro_tax == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_tax is required"));
        }

        model_internal::_doValidationCacheOfPro_tax = validationFailures;
        model_internal::_doValidationLastValOfPro_tax = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_closed_date : Array = null;
    model_internal var _doValidationLastValOfPo_closed_date : String;

    model_internal function _doValidationForPo_closed_date(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPo_closed_date != null && model_internal::_doValidationLastValOfPo_closed_date == value)
           return model_internal::_doValidationCacheOfPo_closed_date ;

        _model.model_internal::_po_closed_dateIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_closed_dateAvailable && _internal_po_closed_date == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_closed_date is required"));
        }

        model_internal::_doValidationCacheOfPo_closed_date = validationFailures;
        model_internal::_doValidationLastValOfPo_closed_date = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfDelivery_loc : Array = null;
    model_internal var _doValidationLastValOfDelivery_loc : ArrayCollection;

    model_internal function _doValidationForDelivery_loc(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfDelivery_loc != null && model_internal::_doValidationLastValOfDelivery_loc == value)
           return model_internal::_doValidationCacheOfDelivery_loc ;

        _model.model_internal::_delivery_locIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDelivery_locAvailable && _internal_delivery_loc == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "delivery_loc is required"));
        }

        model_internal::_doValidationCacheOfDelivery_loc = validationFailures;
        model_internal::_doValidationLastValOfDelivery_loc = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEnq_po_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfEnq_po_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForEnq_po_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfEnq_po_serialnumber_fk != null && model_internal::_doValidationLastValOfEnq_po_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfEnq_po_serialnumber_fk ;

        _model.model_internal::_enq_po_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_po_serialnumber_fkAvailable && _internal_enq_po_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_po_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfEnq_po_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfEnq_po_serialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_discount : Array = null;
    model_internal var _doValidationLastValOfPro_discount : ArrayCollection;

    model_internal function _doValidationForPro_discount(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_discount != null && model_internal::_doValidationLastValOfPro_discount == value)
           return model_internal::_doValidationCacheOfPro_discount ;

        _model.model_internal::_pro_discountIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_discountAvailable && _internal_pro_discount == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_discount is required"));
        }

        model_internal::_doValidationCacheOfPro_discount = validationFailures;
        model_internal::_doValidationLastValOfPro_discount = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSales_conformation_fk : Array = null;
    model_internal var _doValidationLastValOfSales_conformation_fk : ArrayCollection;

    model_internal function _doValidationForSales_conformation_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSales_conformation_fk != null && model_internal::_doValidationLastValOfSales_conformation_fk == value)
           return model_internal::_doValidationCacheOfSales_conformation_fk ;

        _model.model_internal::_sales_conformation_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSales_conformation_fkAvailable && _internal_sales_conformation_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sales_conformation_fk is required"));
        }

        model_internal::_doValidationCacheOfSales_conformation_fk = validationFailures;
        model_internal::_doValidationLastValOfSales_conformation_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSgd_listprice : Array = null;
    model_internal var _doValidationLastValOfSgd_listprice : ArrayCollection;

    model_internal function _doValidationForSgd_listprice(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSgd_listprice != null && model_internal::_doValidationLastValOfSgd_listprice == value)
           return model_internal::_doValidationCacheOfSgd_listprice ;

        _model.model_internal::_sgd_listpriceIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSgd_listpriceAvailable && _internal_sgd_listprice == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sgd_listprice is required"));
        }

        model_internal::_doValidationCacheOfSgd_listprice = validationFailures;
        model_internal::_doValidationLastValOfSgd_listprice = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfOther_part_no : Array = null;
    model_internal var _doValidationLastValOfOther_part_no : ArrayCollection;

    model_internal function _doValidationForOther_part_no(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfOther_part_no != null && model_internal::_doValidationLastValOfOther_part_no == value)
           return model_internal::_doValidationCacheOfOther_part_no ;

        _model.model_internal::_other_part_noIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isOther_part_noAvailable && _internal_other_part_no == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "other_part_no is required"));
        }

        model_internal::_doValidationCacheOfOther_part_no = validationFailures;
        model_internal::_doValidationLastValOfOther_part_no = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfWarehouse_name : Array = null;
    model_internal var _doValidationLastValOfWarehouse_name : ArrayCollection;

    model_internal function _doValidationForWarehouse_name(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfWarehouse_name != null && model_internal::_doValidationLastValOfWarehouse_name == value)
           return model_internal::_doValidationCacheOfWarehouse_name ;

        _model.model_internal::_warehouse_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isWarehouse_nameAvailable && _internal_warehouse_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "warehouse_name is required"));
        }

        model_internal::_doValidationCacheOfWarehouse_name = validationFailures;
        model_internal::_doValidationLastValOfWarehouse_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_name : Array = null;
    model_internal var _doValidationLastValOfPro_name : ArrayCollection;

    model_internal function _doValidationForPro_name(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_name != null && model_internal::_doValidationLastValOfPro_name == value)
           return model_internal::_doValidationCacheOfPro_name ;

        _model.model_internal::_pro_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_nameAvailable && _internal_pro_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_name is required"));
        }

        model_internal::_doValidationCacheOfPro_name = validationFailures;
        model_internal::_doValidationLastValOfPro_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSelf_sc : Array = null;
    model_internal var _doValidationLastValOfSelf_sc : ArrayCollection;

    model_internal function _doValidationForSelf_sc(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSelf_sc != null && model_internal::_doValidationLastValOfSelf_sc == value)
           return model_internal::_doValidationCacheOfSelf_sc ;

        _model.model_internal::_self_scIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSelf_scAvailable && _internal_self_sc == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "self_sc is required"));
        }

        model_internal::_doValidationCacheOfSelf_sc = validationFailures;
        model_internal::_doValidationLastValOfSelf_sc = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEnq_code : Array = null;
    model_internal var _doValidationLastValOfEnq_code : ArrayCollection;

    model_internal function _doValidationForEnq_code(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfEnq_code != null && model_internal::_doValidationLastValOfEnq_code == value)
           return model_internal::_doValidationCacheOfEnq_code ;

        _model.model_internal::_enq_codeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_codeAvailable && _internal_enq_code == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_code is required"));
        }

        model_internal::_doValidationCacheOfEnq_code = validationFailures;
        model_internal::_doValidationLastValOfEnq_code = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPart_number : Array = null;
    model_internal var _doValidationLastValOfPart_number : ArrayCollection;

    model_internal function _doValidationForPart_number(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPart_number != null && model_internal::_doValidationLastValOfPart_number == value)
           return model_internal::_doValidationCacheOfPart_number ;

        _model.model_internal::_part_numberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPart_numberAvailable && _internal_part_number == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "part_number is required"));
        }

        model_internal::_doValidationCacheOfPart_number = validationFailures;
        model_internal::_doValidationLastValOfPart_number = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_remarks : Array = null;
    model_internal var _doValidationLastValOfPo_remarks : String;

    model_internal function _doValidationForPo_remarks(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPo_remarks != null && model_internal::_doValidationLastValOfPo_remarks == value)
           return model_internal::_doValidationCacheOfPo_remarks ;

        _model.model_internal::_po_remarksIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_remarksAvailable && _internal_po_remarks == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_remarks is required"));
        }

        model_internal::_doValidationCacheOfPo_remarks = validationFailures;
        model_internal::_doValidationLastValOfPo_remarks = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEnq_pro_qty : Array = null;
    model_internal var _doValidationLastValOfEnq_pro_qty : ArrayCollection;

    model_internal function _doValidationForEnq_pro_qty(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfEnq_pro_qty != null && model_internal::_doValidationLastValOfEnq_pro_qty == value)
           return model_internal::_doValidationCacheOfEnq_pro_qty ;

        _model.model_internal::_enq_pro_qtyIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_pro_qtyAvailable && _internal_enq_pro_qty == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_pro_qty is required"));
        }

        model_internal::_doValidationCacheOfEnq_pro_qty = validationFailures;
        model_internal::_doValidationLastValOfEnq_pro_qty = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfUnit_price : Array = null;
    model_internal var _doValidationLastValOfUnit_price : ArrayCollection;

    model_internal function _doValidationForUnit_price(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfUnit_price != null && model_internal::_doValidationLastValOfUnit_price == value)
           return model_internal::_doValidationCacheOfUnit_price ;

        _model.model_internal::_unit_priceIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUnit_priceAvailable && _internal_unit_price == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "unit_price is required"));
        }

        model_internal::_doValidationCacheOfUnit_price = validationFailures;
        model_internal::_doValidationLastValOfUnit_price = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_description : Array = null;
    model_internal var _doValidationLastValOfPro_description : ArrayCollection;

    model_internal function _doValidationForPro_description(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_description != null && model_internal::_doValidationLastValOfPro_description == value)
           return model_internal::_doValidationCacheOfPro_description ;

        _model.model_internal::_pro_descriptionIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_descriptionAvailable && _internal_pro_description == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_description is required"));
        }

        model_internal::_doValidationCacheOfPro_description = validationFailures;
        model_internal::_doValidationLastValOfPro_description = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_issue_date : Array = null;
    model_internal var _doValidationLastValOfPo_issue_date : String;

    model_internal function _doValidationForPo_issue_date(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPo_issue_date != null && model_internal::_doValidationLastValOfPo_issue_date == value)
           return model_internal::_doValidationCacheOfPo_issue_date ;

        _model.model_internal::_po_issue_dateIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_issue_dateAvailable && _internal_po_issue_date == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_issue_date is required"));
        }

        model_internal::_doValidationCacheOfPo_issue_date = validationFailures;
        model_internal::_doValidationLastValOfPo_issue_date = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_qty : Array = null;
    model_internal var _doValidationLastValOfPro_qty : ArrayCollection;

    model_internal function _doValidationForPro_qty(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_qty != null && model_internal::_doValidationLastValOfPro_qty == value)
           return model_internal::_doValidationCacheOfPro_qty ;

        _model.model_internal::_pro_qtyIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_qtyAvailable && _internal_pro_qty == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_qty is required"));
        }

        model_internal::_doValidationCacheOfPro_qty = validationFailures;
        model_internal::_doValidationLastValOfPro_qty = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSc_detserialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfSc_detserialnumber_fk : ArrayCollection;

    model_internal function _doValidationForSc_detserialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSc_detserialnumber_fk != null && model_internal::_doValidationLastValOfSc_detserialnumber_fk == value)
           return model_internal::_doValidationCacheOfSc_detserialnumber_fk ;

        _model.model_internal::_sc_detserialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSc_detserialnumber_fkAvailable && _internal_sc_detserialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sc_detserialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfSc_detserialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfSc_detserialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEnq_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfEnq_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForEnq_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfEnq_serialnumber_fk != null && model_internal::_doValidationLastValOfEnq_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfEnq_serialnumber_fk ;

        _model.model_internal::_enq_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_serialnumber_fkAvailable && _internal_enq_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfEnq_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfEnq_serialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEnq_pro_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfEnq_pro_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForEnq_pro_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfEnq_pro_serialnumber_fk != null && model_internal::_doValidationLastValOfEnq_pro_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfEnq_pro_serialnumber_fk ;

        _model.model_internal::_enq_pro_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_pro_serialnumber_fkAvailable && _internal_enq_pro_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_pro_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfEnq_pro_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfEnq_pro_serialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfPo_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForPo_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPo_serialnumber_fk != null && model_internal::_doValidationLastValOfPo_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfPo_serialnumber_fk ;

        _model.model_internal::_po_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_serialnumber_fkAvailable && _internal_po_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfPo_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfPo_serialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfClient_name : Array = null;
    model_internal var _doValidationLastValOfClient_name : String;

    model_internal function _doValidationForClient_name(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfClient_name != null && model_internal::_doValidationLastValOfClient_name == value)
           return model_internal::_doValidationCacheOfClient_name ;

        _model.model_internal::_client_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isClient_nameAvailable && _internal_client_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "client_name is required"));
        }

        model_internal::_doValidationCacheOfClient_name = validationFailures;
        model_internal::_doValidationLastValOfClient_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_detserialnumber : Array = null;
    model_internal var _doValidationLastValOfPo_detserialnumber : ArrayCollection;

    model_internal function _doValidationForPo_detserialnumber(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPo_detserialnumber != null && model_internal::_doValidationLastValOfPo_detserialnumber == value)
           return model_internal::_doValidationCacheOfPo_detserialnumber ;

        _model.model_internal::_po_detserialnumberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_detserialnumberAvailable && _internal_po_detserialnumber == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_detserialnumber is required"));
        }

        model_internal::_doValidationCacheOfPo_detserialnumber = validationFailures;
        model_internal::_doValidationLastValOfPo_detserialnumber = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEnq_detserialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfEnq_detserialnumber_fk : ArrayCollection;

    model_internal function _doValidationForEnq_detserialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfEnq_detserialnumber_fk != null && model_internal::_doValidationLastValOfEnq_detserialnumber_fk == value)
           return model_internal::_doValidationCacheOfEnq_detserialnumber_fk ;

        _model.model_internal::_enq_detserialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_detserialnumber_fkAvailable && _internal_enq_detserialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_detserialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfEnq_detserialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfEnq_detserialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfCre_datetime : Array = null;
    model_internal var _doValidationLastValOfCre_datetime : String;

    model_internal function _doValidationForCre_datetime(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfCre_datetime != null && model_internal::_doValidationLastValOfCre_datetime == value)
           return model_internal::_doValidationCacheOfCre_datetime ;

        _model.model_internal::_cre_datetimeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isCre_datetimeAvailable && _internal_cre_datetime == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "cre_datetime is required"));
        }

        model_internal::_doValidationCacheOfCre_datetime = validationFailures;
        model_internal::_doValidationLastValOfCre_datetime = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_status : Array = null;
    model_internal var _doValidationLastValOfPo_status : String;

    model_internal function _doValidationForPo_status(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPo_status != null && model_internal::_doValidationLastValOfPo_status == value)
           return model_internal::_doValidationCacheOfPo_status ;

        _model.model_internal::_po_statusIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_statusAvailable && _internal_po_status == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_status is required"));
        }

        model_internal::_doValidationCacheOfPo_status = validationFailures;
        model_internal::_doValidationLastValOfPo_status = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_status : Array = null;
    model_internal var _doValidationLastValOfPro_status : ArrayCollection;

    model_internal function _doValidationForPro_status(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_status != null && model_internal::_doValidationLastValOfPro_status == value)
           return model_internal::_doValidationCacheOfPro_status ;

        _model.model_internal::_pro_statusIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_statusAvailable && _internal_pro_status == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_status is required"));
        }

        model_internal::_doValidationCacheOfPro_status = validationFailures;
        model_internal::_doValidationLastValOfPro_status = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_id : Array = null;
    model_internal var _doValidationLastValOfPo_id : String;

    model_internal function _doValidationForPo_id(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPo_id != null && model_internal::_doValidationLastValOfPo_id == value)
           return model_internal::_doValidationCacheOfPo_id ;

        _model.model_internal::_po_idIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_idAvailable && _internal_po_id == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_id is required"));
        }

        model_internal::_doValidationCacheOfPo_id = validationFailures;
        model_internal::_doValidationLastValOfPo_id = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_total_price : Array = null;
    model_internal var _doValidationLastValOfPro_total_price : ArrayCollection;

    model_internal function _doValidationForPro_total_price(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_total_price != null && model_internal::_doValidationLastValOfPro_total_price == value)
           return model_internal::_doValidationCacheOfPro_total_price ;

        _model.model_internal::_pro_total_priceIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_total_priceAvailable && _internal_pro_total_price == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_total_price is required"));
        }

        model_internal::_doValidationCacheOfPro_total_price = validationFailures;
        model_internal::_doValidationLastValOfPro_total_price = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfStamp_number : Array = null;
    model_internal var _doValidationLastValOfStamp_number : ArrayCollection;

    model_internal function _doValidationForStamp_number(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfStamp_number != null && model_internal::_doValidationLastValOfStamp_number == value)
           return model_internal::_doValidationCacheOfStamp_number ;

        _model.model_internal::_stamp_numberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isStamp_numberAvailable && _internal_stamp_number == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "stamp_number is required"));
        }

        model_internal::_doValidationCacheOfStamp_number = validationFailures;
        model_internal::_doValidationLastValOfStamp_number = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfPro_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForPro_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_serialnumber_fk != null && model_internal::_doValidationLastValOfPro_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfPro_serialnumber_fk ;

        _model.model_internal::_pro_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_serialnumber_fkAvailable && _internal_pro_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfPro_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfPro_serialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEnq_det_po_serialnumber : Array = null;
    model_internal var _doValidationLastValOfEnq_det_po_serialnumber : ArrayCollection;

    model_internal function _doValidationForEnq_det_po_serialnumber(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfEnq_det_po_serialnumber != null && model_internal::_doValidationLastValOfEnq_det_po_serialnumber == value)
           return model_internal::_doValidationCacheOfEnq_det_po_serialnumber ;

        _model.model_internal::_enq_det_po_serialnumberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEnq_det_po_serialnumberAvailable && _internal_enq_det_po_serialnumber == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "enq_det_po_serialnumber is required"));
        }

        model_internal::_doValidationCacheOfEnq_det_po_serialnumber = validationFailures;
        model_internal::_doValidationLastValOfEnq_det_po_serialnumber = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_confirm_date : Array = null;
    model_internal var _doValidationLastValOfPo_confirm_date : String;

    model_internal function _doValidationForPo_confirm_date(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfPo_confirm_date != null && model_internal::_doValidationLastValOfPo_confirm_date == value)
           return model_internal::_doValidationCacheOfPo_confirm_date ;

        _model.model_internal::_po_confirm_dateIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_confirm_dateAvailable && _internal_po_confirm_date == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_confirm_date is required"));
        }

        model_internal::_doValidationCacheOfPo_confirm_date = validationFailures;
        model_internal::_doValidationLastValOfPo_confirm_date = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfExpected_datetime : Array = null;
    model_internal var _doValidationLastValOfExpected_datetime : String;

    model_internal function _doValidationForExpected_datetime(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfExpected_datetime != null && model_internal::_doValidationLastValOfExpected_datetime == value)
           return model_internal::_doValidationCacheOfExpected_datetime ;

        _model.model_internal::_expected_datetimeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isExpected_datetimeAvailable && _internal_expected_datetime == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "expected_datetime is required"));
        }

        model_internal::_doValidationCacheOfExpected_datetime = validationFailures;
        model_internal::_doValidationLastValOfExpected_datetime = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSales_con_code : Array = null;
    model_internal var _doValidationLastValOfSales_con_code : ArrayCollection;

    model_internal function _doValidationForSales_con_code(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSales_con_code != null && model_internal::_doValidationLastValOfSales_con_code == value)
           return model_internal::_doValidationCacheOfSales_con_code ;

        _model.model_internal::_sales_con_codeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSales_con_codeAvailable && _internal_sales_con_code == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sales_con_code is required"));
        }

        model_internal::_doValidationCacheOfSales_con_code = validationFailures;
        model_internal::_doValidationLastValOfSales_con_code = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfWarehouse_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfWarehouse_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForWarehouse_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfWarehouse_serialnumber_fk != null && model_internal::_doValidationLastValOfWarehouse_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfWarehouse_serialnumber_fk ;

        _model.model_internal::_warehouse_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isWarehouse_serialnumber_fkAvailable && _internal_warehouse_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "warehouse_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfWarehouse_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfWarehouse_serialnumber_fk = value;

        return validationFailures;
    }
    

}

}
